﻿using System.ServiceModel;
using FU.Capstones.IMS.Services.Common;
using FU.Capstones.IMS.Services.Common.DataContracts;
using FU.Capstones.IMS.Services.Common.Respondents;
using FU.Capstones.IMS.Services.DataContracts;

namespace FU.Capstones.IMS.Services.Interfaces
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IInventoryService" in both code and config file together.
    [ServiceContract(Namespace = InventoryConstants.ServiceNamespace, Name = InventoryConstants.ServiceName)]
    public interface IInventoryService
    {
        #region Account

        ///// <summary>
        ///// This method aims to get all records of Account table from database
        ///// </summary>
        ///// <returns>
        ///// An Feedback object contains all Account records
        ///// </returns>
        //[OperationContract]
        //CollectionFeedback<Account> GetAccountCollection(bool isShowAll);

        ///// <summary>
        ///// This method aims to get detailed information of an Account based on its ID.
        ///// </summary>
        ///// <param name="objID">
        ///// The ID of the desired Account
        ///// </param>
        ///// <returns>
        ///// A Feedback object containing a detailed Account
        ///// </returns>
        //[OperationContract]
        //SingleFeedback<Account> GetSingleAccount(int objID);

        ///// <summary>
        ///// This method aims to insert a new Account into database
        ///// </summary>
        ///// <param name="data">
        ///// Account object to be inserted
        ///// </param>
        ///// <returns>
        ///// A Feedback object containing information about 
        /////    - inserting result and 
        /////    - the ID of new object if success or -1 otherwise
        ///// </returns>
        //[OperationContract]
        //SingleFeedback<int> InsertAccount(Account data);

        ///// <summary>
        ///// This method aims to update an existing Account record in database
        ///// </summary>
        ///// <param name="data">
        ///// Account object to be updated
        ///// </param>
        ///// <returns>
        ///// A Feedback object containing updating result
        ///// </returns>
        //[OperationContract]
        //Feedback UpdateAccount(Account data);

        ///// <summary>
        ///// This method aims to delete an existing Account record in database
        ///// </summary>
        ///// <param name="objID">
        ///// Account object to be deleted
        ///// </param>
        ///// <returns>
        ///// A Feedback object containing deleting result
        ///// </returns>
        //[OperationContract]
        //Feedback DeleteAccount(int objID);

        ///// <summary>
        ///// This method aims to undelete an existing Account record in database
        ///// </summary>
        ///// <param name="objID">
        ///// Account object to be undelete
        ///// </param>
        ///// <returns>
        ///// A Feedback object containing undeleting result
        ///// </returns>
        //[OperationContract]
        //Feedback UndoDeleteAccount(int objID);

        ///// <summary>
        ///// This method aims to find out specific Account record(s) in the database based on the input criteria.
        ///// </summary>
        ///// <param name="criteria">
        ///// The object contains the searching criteria.
        ///// </param>
        ///// <returns>
        ///// A Feedback object containing searching result
        ///// </returns>
        //[OperationContract]
        //CollectionFeedback<Account> SearchAccount(Account criteria);

        /// <summary>
        /// This method verifies user criteria then allow user to access our system.
        /// </summary>
        /// <param name="account">
        /// The object contains user criteria
        /// </param>
        /// <returns>
        /// A Feedback object contains login resutl with all information of logged-in account if success.
        /// </returns>
        [OperationContract]
        SingleFeedback<Account> Login(Account account);

        [OperationContract]
        Feedback CheckIfUsernameExists(string usernameToCheck);

        [OperationContract]
        Feedback ResetPassword(Account account);

        [OperationContract]
        Feedback ChangePassword(NewPasswordData account);
        #endregion

        #region Authorization

        /// <summary>
        /// This method aims to get all records of Authorization table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Authorization records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Authorization> GetAuthorizationCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of an Authorization based on its ID.
        /// </summary>
        /// <param name="objectID">
        /// The ID of the desired Authorization
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Authorization
        /// </returns>
        [OperationContract]
        SingleFeedback<Authorization> GetSingleAuthorization(int objectID);

        /// <summary>
        /// This method aims to insert a new Authorization record into database
        /// </summary>
        /// <param name="data">
        /// Authorization object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new Authorization object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertAuthorization(Authorization data);

        /// <summary>
        /// This method aims to update an existing Authorization record in database
        /// </summary>
        /// <param name="data">
        /// The Authorization object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateAuthorization(Authorization data);

        /// <summary>
        /// This method aims to delete an existing Authorization record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteAuthorization(int objID);

        /// <summary>
        /// This method aims to find out specific Authorization record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Authorization> SearchAuthorization(Authorization criteria);

        #endregion

        #region Contact

        /// <summary>
        /// This method aims to get all records of Contact table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Contact records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Contact> GetContactCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of an Contact based on its ID.
        /// </summary>
        /// <param name="contactID">
        /// The ID of the desired Contact
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Contact object
        /// </returns>
        [OperationContract]
        SingleFeedback<Contact> GetSingleContact(int contactID);

        /// <summary>
        /// This method aims to insert a new Contact record into database
        /// </summary>
        /// <param name="data">
        /// Contact object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertContact(Contact data);

        /// <summary>
        /// This method aims to update an existing Contact record in database
        /// </summary>
        /// <param name="data">
        /// Contact object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateContact(Contact data);

        /// <summary>
        /// This method aims to delete an existing Contact record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteContact(int objID);

        /// <summary>
        /// This method aims to undelete an existing Contact record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeleteContact(int objID);

        /// <summary>
        /// This method aims to find out specific Contact record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Contact> SearchContact(Contact criteria);

        #endregion

        #region Employee

        /// <summary>
        /// This method aims to get all records of Employee table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Employee records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Employee> GetEmployeeCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of an Employee based on its ID.
        /// </summary>
        /// <param name="objectID">
        /// The ID of the desired Employee
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Employee object
        /// </returns>
        [OperationContract]
        SingleFeedback<Employee> GetSingleEmployee(int objectID);

        /// <summary>
        /// This method aims to insert a new Employee record into database
        /// </summary>
        /// <param name="data">
        /// Employee object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertEmployee(Employee data);

        /// <summary>
        /// This method aims to update an existing Employee record in database
        /// </summary>
        /// <param name="data">
        /// Employee object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateEmployee(Employee data);

        /// <summary>
        /// This method aims to delete an existing Employee record in database
        /// </summary>
        /// <param name="objID">
        /// THe ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteEmployee(int objID);

        /// <summary>
        /// This method aims to undelete an existing Employee record in database
        /// </summary>
        /// <param name="objID">
        /// THe ID of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeleteEmployee(int objID);

        /// <summary>
        /// This method aims to find out specific Employee record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Employee> SearchEmployee(EmployeeCriteria criteria);

        #endregion

        #region EmploymentType

        /// <summary>
        /// This method aims to get all records of EmploymentType table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all EmploymentType records
        /// </returns>
        [OperationContract]
        CollectionFeedback<EmploymentType> GetEmploymentTypeCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of an EmploymentType based on its ID.
        /// </summary>
        /// <param name="employmentTypeID">
        /// The ID of the desired EmploymentType
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed EmploymentType object
        /// </returns>
        [OperationContract]
        SingleFeedback<EmploymentType> GetSingleEmploymentType(int employmentTypeID);

        /// <summary>
        /// This method aims to insert a new EmploymentType record into database
        /// </summary>
        /// <param name="data">
        /// EmploymentType object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertEmploymentType(EmploymentType data);

        /// <summary>
        /// This method aims to update an existing EmploymentType record in database
        /// </summary>
        /// <param name="data">
        /// EmploymentType object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateEmploymentType(EmploymentType data);

        /// <summary>
        /// This method aims to delete an existing EmploymentType record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteEmploymentType(int objID);

        /// <summary>
        /// This method aims to undelete an existing EmploymentType record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeleteEmploymentType(int objID);

        /// <summary>
        /// This method aims to find out specific EmploymentType record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<EmploymentType> SearchEmploymentType(EmploymentType criteria);

        #endregion

        #region Material

        /// <summary>
        /// This method aims to get all records of Material table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Material records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Material> GetMaterialCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get all records of Material table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Material records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Material> GetMaterialCollectionType(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of a Material based on its ID.
        /// </summary>
        /// <param name="materialID">
        /// The ID of the desired Material
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Material object
        /// </returns>
        [OperationContract]
        SingleFeedback<Material> GetSingleMaterial(int materialID);

        /// <summary>
        /// This method aims to insert a new Material record into database
        /// </summary>
        /// <param name="data">
        /// Material object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertMaterial(Material data);

        /// <summary>
        /// This method aims to update an existing Material record in database
        /// </summary>
        /// <param name="data">
        /// The object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateMaterial(Material data);

        /// <summary>
        /// This method aims to delete an existing Material record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteMaterial(int objID);

        /// <summary>
        /// This method aims to undelete an existing Material record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeleteMaterial(int objID);

        /// <summary>
        /// This method aims to find out specific Material record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Material> SearchMaterial(MaterialCriteria criteria);

        #endregion

        #region Order

        /// <summary>
        /// This method aims to get all records of Order table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Order records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Order> GetOrderCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get all records of Order table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Order records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Order> GetOrderCollectionByParameter(bool? isMaterial);
        /// <summary>
        /// This method aims to get detailed information of an Order based on its ID.
        /// </summary>
        /// <param name="orderID">
        /// The ID of the desired Order
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Order object
        /// </returns>
        [OperationContract]
        SingleFeedback<Order> GetSingleOrder(int orderID);

        /// <summary>
        /// This method aims to insert a new Order record into database
        /// </summary>
        /// <param name="data">
        /// Order object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertOrder(Order data);

        /// <summary>
        /// This method aims to update an existing Order record in database
        /// </summary>
        /// <param name="data">
        /// Order object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateOrder(Order data);

        /// <summary>
        /// This method aims to delete an existing Order record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteOrder(int objID);

        /// <summary>
        /// This method aims to undelete an existing Order record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeleteOrder(int objID);

        /// <summary>
        /// This method aims to find out specific Order record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Order> SearchOrder(OrderCriteria  criteria);
        #endregion

        #region Partner

        /// <summary>
        /// This method aims to get all records of Partner table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Partner records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Partner> GetPartnerCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get all records of Partner table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Partner records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Partner> GetPartnerCollectionByParam(bool? isSupplier);

        /// <summary>
        /// This method aims to get detailed information of a Partner based on its ID.
        /// </summary>
        /// <param name="partnerID">
        /// The ID of the desired Partner
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Partner object
        /// </returns>
        [OperationContract]
        SingleFeedback<Partner> GetSinglePartner(int partnerID);

        /// <summary>
        /// This method aims to insert a new Partner record into database
        /// </summary>
        /// <param name="data">
        /// Partner object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertPartner(Partner data);

        /// <summary>
        /// This method aims to update an existing Partner record in database
        /// </summary>
        /// <param name="data">
        /// Partner object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdatePartner(Partner data);

        /// <summary>
        /// This method aims to delete an existing Partner record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeletePartner(int objID);

        /// <summary>
        /// This method aims to undelete an existing Partner record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeletePartner(int objID);

        /// <summary>
        /// This method aims to find out specific Partner record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Partner> SearchPartner(Partner criteria);

        #endregion

        #region Product

        /// <summary>
        /// This method aims to get all records of Product table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Product records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Product> GetProductCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get all records of Product table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Product records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Product> GetProductCollectionType(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of a Product based on its ID.
        /// </summary>
        /// <param name="productID">
        /// The ID of the desired Product
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Product object
        /// </returns>
        [OperationContract]
        SingleFeedback<Product> GetSingleProduct(int productID);

        /// <summary>
        /// This method aims to insert a new Product record into database
        /// </summary>
        /// <param name="data">
        /// Product object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertProduct(Product data);

        /// <summary>
        /// This method aims to insert a new Product record into database
        /// </summary>
        /// <param name="data">
        /// Product object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        Feedback InsertBuiltupMaterial(int pID, int mID, long mQuantity);

        /// <summary>
        /// This method aims to update an existing Product record in database
        /// </summary>
        /// <param name="data">
        /// Product object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateProduct(Product data);

        /// <summary>
        /// This method aims to delete an existing Product record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteProduct(int objID);

        /// <summary>
        /// This method aims to delete an existing Product record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteProductBuiltup(int pID,int mID);

        /// <summary>
        /// This method aims to undelete an existing Product record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeleteProduct(int objID);

        /// <summary>
        /// This method aims to find out specific Product record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Product> SearchProduct(ProductCriteria criteria);

        #endregion

        #region Role

        /// <summary>
        /// This method aims to get all records of Role table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Role records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Role> GetRoleCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of a Role based on its ID.
        /// </summary>
        /// <param name="roleID">
        /// The ID of the desired Role
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Role object
        /// </returns>
        [OperationContract]
        SingleFeedback<Role> GetSingleRole(int roleID);

        /// <summary>
        /// This method aims to insert a new Role record into database
        /// </summary>
        /// <param name="data">
        /// Role object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertRole(Role data);

        /// <summary>
        /// This method aims to update an existing record in database
        /// </summary>
        /// <param name="data">
        /// Role object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateRole(Role data);

        /// <summary>
        /// This method aims to delete an existing Role record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteRole(int objID);

        /// <summary>
        /// This method aims to undelete an existing Role record in database
        /// </summary>
        /// <param name="objID">
        /// The ID of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeleteRole(int objID);

        /// <summary>
        /// This method aims to find out specific Role record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Role> SearchRole(Role criteria);

        #endregion

        #region Warehouse

        /// <summary>
        /// This method aims to get all records of Warehouse table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Warehouse records
        /// </returns>
        [OperationContract]
        CollectionFeedback<Warehouse> GetWarehouseCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of a Warehouse based on its ID.
        /// </summary>
        /// <param name="warehouseID">
        /// The ID of the desired Warehouse
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Warehouse object
        /// </returns>
        [OperationContract]
        SingleFeedback<Warehouse> GetSingleWarehouse(int warehouseID);

        /// <summary>
        /// This method aims to insert a new Warehouse record into database
        /// </summary>
        /// <param name="data">
        /// Warehouse object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1 otherwise
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertWarehouse(Warehouse data);

        /// <summary>
        /// This method aims to update an existing Warehouse record in database
        /// </summary>
        /// <param name="data">
        /// Warehouse object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateWarehouse(Warehouse data);

        /// <summary>
        /// This method aims to delete an existing Warehouse record in database
        /// </summary>
        /// <param name="objID">
        /// The Id of record to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteWarehouse(int objID);

        /// <summary>
        /// This method aims to undelete an existing Warehouse record in database
        /// </summary>
        /// <param name="objID">
        /// The Id of record to be undeleted
        /// </param>
        /// <returns>
        /// A Feedback object containing undeleting result
        /// </returns>
        [OperationContract]
        Feedback UndoDeleteWarehouse(int objID);

        /// <summary>
        /// This method aims to find out specific Warehouse record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<Warehouse> SearchWarehouse(Warehouse criteria);

        #endregion

        #region MaterialLoaf

        /// <summary>
        /// This method aims to get all records of Material loaf table from database
        /// </summary>
        /// <returns>
        /// An Feedback object contains all Material loaf records
        /// </returns>
        [OperationContract]
        CollectionFeedback<MaterialLoaf> GetMaterialLoafCollection(bool isShowAll);

        /// <summary>
        /// This method aims to get detailed information of a Material Loaf based on its ID.
        /// </summary>
        /// <param name="OrderID">
        /// The ID of the desired Material
        /// </param>
        /// <returns>
        /// A Feedback object containing a detailed Material Loaf object
        /// </returns>
        [OperationContract]
        SingleFeedback<MaterialLoaf> GetSingleMaterialLoaf(int materialID);

        /// <summary>
        /// This method aims to insert a new Material Loaf record into database
        /// </summary>
        /// <param name="data">
        /// Material object to be inserted
        /// </param>
        /// <returns>
        /// A Feedback object containing information about 
        ///    - inserting result and 
        ///    - the ID of new object if success or -1
        /// </returns>
        [OperationContract]
        SingleFeedback<int> InsertMaterialLoaf(MaterialLoaf data);

        /// <summary>
        /// This method aims to update an existing Material record in database
        /// </summary>
        /// <param name="data">
        /// The object to be updated
        /// </param>
        /// <returns>
        /// A Feedback object containing updating result
        /// </returns>
        [OperationContract]
        Feedback UpdateMaterialLoaf(MaterialLoaf data);

        /// <summary>
        /// This method aims to delete an existing Material Loaf record in database
        /// </summary>
        /// <param name="data">
        /// Material object to be deleted
        /// </param>
        /// <returns>
        /// A Feedback object containing deleting result
        /// </returns>
        [OperationContract]
        Feedback DeleteMaterialLoaf(int data);

        /// <summary>
        /// This method aims to find out specific Material Loaf record(s) in the database based on the input criteria.
        /// </summary>
        /// <param name="criteria">
        /// The object contains the searching criteria.
        /// </param>
        /// <returns>
        /// A Feedback object containing searching result
        /// </returns>
        [OperationContract]
        CollectionFeedback<MaterialLoaf> SearchMaterialLoaf(MaterialLoaf criteria);

        #endregion
    }
}
